package com.evil.application.api;

import com.evil.application.config.FeignErrorDecoder;
import com.evil.application.pojo.dto.apply.ApplicationApplySettingDTO;
import com.evil.common.application.dto.ApplicationKeyVersionReqDTO;
import com.evil.common.core.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 应用提交设置接口
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@FeignClient(name = ServiceNameConstant.APPLICATION_SERVICE, configuration = {FeignErrorDecoder.class})
public interface RemoteApplicationApplySettingService {

    /**
     * 应用提交设置信息
     *
     * @param applicationKeyVersionReqDTO applicationKeyVersionReqDTO
     */
    @PostMapping("/remote/application/apply-setting/info")
    ApplicationApplySettingDTO applySettingInfo(@Validated @RequestBody ApplicationKeyVersionReqDTO applicationKeyVersionReqDTO);

    /**
     * 编辑应用提交设置信息
     *
     * @param applicationApplySettingDTO applicationApplySettingDTO
     */
    @PostMapping("/remote/application/apply-setting/modify")
    void modifyApplySetting(@Validated @RequestBody ApplicationApplySettingDTO applicationApplySettingDTO);
}
